<?php

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_contract_principal".
 *
 * @property string $principal_id
 * @property string $contract_id
 * @property string $principal_by
 * @property string $principal_abu_name
 * @property string $principal_department_by
 * @property string $principal_area_by
 * @property string $principal_remark
 * @property string $principal_on
 * @property string $principal_end
 */
class ContractPrincipalEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_principal';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['principal_id'], 'required'],
            [['principal_on'], 'safe'],
            [['principal_id', 'contract_id', 'principal_by', 'principal_abu_name', 'principal_department_by', 'principal_area_by', 'principal_end'], 'string', 'max' => 36],
            [['principal_remark'], 'string', 'max' => 500]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'principal_id' => 'Principal ID',
            'contract_id' => 'Contract ID',
            'principal_by' => 'Principal By',
            'principal_abu_name' => 'Principal Abu Name',
            'principal_department_by' => 'Principal Department By',
            'principal_area_by' => 'Principal Area By',
            'principal_remark' => 'Principal Remark',
            'principal_on' => 'Principal On',
            'principal_end' => 'Principal End',
        ];
    }
}
